package com.cloudkinto.service.order;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.bo.order.OrderYahooQueryBo;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.OrderYahooDo;
import com.cloudkinto.service.order.vo.OrderYahooExcelReq;
import com.cloudkinto.service.order.vo.rakuten.OrderRakutenExcelReq;
import com.cloudkinto.service.order.vo.yahoo.OrderShipStatusChangeReq;
import com.cloudkinto.service.order.vo.yahoo.OrderYahooDetailRes;
import com.cloudkinto.service.order.vo.yahoo.OrderYahooDoPageEntity;
import com.cloudkinto.service.orderoutput.vo.OrderOutputAddReq;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author huajiyu
 * @since 2022-07-11
 */
public interface OrderYahooService extends IService<OrderYahooDo> {

    SingleResult addInit();

    Object add(Object req, Long userId);

    SingleResult updateInit(Long id);

    Object update(Object updateVo, Long userId);

    int delete(Long id, Long userId);

    OrderYahooDetailRes detail(Long id);

    SingleResult pageInit(Long companyId);

    List<OrderYahooDoPageEntity> getList(OrderYahooQueryBo bo);

    PageResult getListPage(OrderYahooQueryBo bo);

    Map<String, Object> getYahooUserInfoApi(Long shopId);

    Map<String, Object> getYahooOrderList(Long shopId, Map<String, String> map);

    Map<String, Object> getYahooOrderInfo(Long shopId, String orderId);

    Map<String, Object> orderShipStatusChange(OrderShipStatusChangeReq req);

    void timingSyncYahooOrder(String type);

    void syncYahooOrder(Map<String, String> map, int count);

    Object ordersyncInit(Long currentUserId, Long companyId);



    /**
     * @param orderids
     * @param currentUserId
     * @param b
     * @return
     */
    SingleResult queryOrder2SendOut(String[] orderids, Long currentUserId, boolean isAuto,Long companyId);
    SingleResult queryOrder2SendOutNoPackage(String orderid, Long currentUserId, boolean b, Long companyId);

    SingleResult sendOutMatch(List<OrderOutputAddReq> orderOutputAddReqList, Long userId, Long companyId);

    int setOrderSend(Long[] orderids,Long userId);

    boolean setOrderSysTips(Long orderId, String desc, Long companyId);

    void exportExcel(OrderYahooQueryBo bo, HttpServletResponse response) throws IOException;

    void autoSendYahooOrder();

}
